[#import "../framework/JGP.htm"  as JGP]

<!--
项目   sys
作者   loufei
时间   2018/2/24
-->
[@JGP.head "${(sys.name)!''}"]
    <style>
        .top{
            background-color: #607D8B;
        }
        .top .logo{
            color: white;
            font-size: 1.5em;
            line-height: 50px;
            padding-left: 20px;
        }
        .left-menu .title .big .icon{
            font-size: 1.3em;
        }
        .south{
            font-size: 0.8em;
            line-height: 30px;
            text-align: center;
        }
        .top-operate{
            display: table;
            height: 100%;
        }
        .top-operate a{
            color: white;
            display: table-cell;
            margin: 10px;
        }
    </style>
[/@JGP.head]
[@JGP.body]
    <jgp-layout-border _north="{'height': '50px'}"
                       _west="{'width': '230px','holder':true}"
                       _south="{'height': '30px'}">
        <jgp-div _class="top" slot="north" _col="['200','*','200']" _cunit="px">
            <div class="logo" slot="1-1">
                <img width="23px" height="23px" src="/static/images/logo.png">
                JGP开发平台
            </div>

            <jgp-adv-user-info
                    slot="1-3"
                    _id="user-info"
                    _size="25"
                    _logout_url="${base!'/'}security/entry-ctl/logout"></jgp-adv-user-info>

        </jgp-div>
        <jgp-panel slot="west" class="left-menu" _default_tools="[]"
                   _title="<i class='icon fa fa-list'></i>&nbsp;&nbsp;<span>功能菜单</span>">
            <jgp-menu _onclick="goLink"
                      _lazy="false"
                      _url="[#if securityEnable]/security/menu-api-ctl/query-tree[#else]/sys/menu-api-ctl/query-tree[/#if]"></jgp-menu>
        </jgp-panel>
        <jgp-tab-panel _id="mainFrame" slot="center" _locked_keys="sys-index" _max_size="30">
            <jgp-tab _id="sys-index" _title="首页" _url="/druid"></jgp-tab>
        </jgp-tab-panel>
        <jgp-panel slot="south">
            Copyright © 2016 LOU FEI (Gavin Lou)
        </jgp-panel>
    </jgp-layout-border>
[/@JGP.body]

[@JGP.foot]
    <script>
        function goLink(result){
            var link = result.back.bean.link;
            if(link){
                var mainPanel = JGP.tabPanel('mainFrame');
                mainPanel.addTab(result.back.key,result.back.title,link);
            }
        }

        function goHome() {
            var mainPanel = top.JGP.panel('mainFrame');
            mainPanel.load('/druid');
            mainPanel.setTitle('首页');
        }
    </script>
[/@JGP.foot]